A typical data storage system includes a set of storage processors and an array of storage devices. Each storage processor performs, on behalf of one or more external hosts, input/output (IO) operations such as store operations to store host data in the array, and load operations to load host data from the array.
Some data storage systems perform snapshot operations to save versions of host data at particular times. When a snapshot is taken by a storage processor, the storage processor copies old host data from a production file system (i.e., a current version of the host data) to a designated snapshot area before the old host data is overwritten with new host data. As a result, the snapshot is formed via a combination of unchanged host data which still resides in the production file system (i.e., primary data) and the host data copied to the designated snapshot area (i.e., snapshot data).
One conventional data storage system, which provides snapshot functionality, uses a B-tree data structure to track where the snapshot data is stored in the designated snapshot area and to provide fast lookup of the snapshot data. During system operation, each time a storage processor copies primary data from a block location of the production file system to a block location of the designated snapshot area, the storage processor individually locks and updates a section of the B-tree data structure with a mapping pair, i.e., a software construct containing the block number of the block location of the production file system and the block number of the block location of the designated snapshot area. That is, each time a block of the production file system is copied to the designated snapshot area, the B-tree data structure is locked and updated with a new mapping pair. To restore a snapshot of the production file system, the mapping pairs within the B-tree data structure are accessed to identify which blocks of the production file system have changed, and where the blocks containing snapshot data are located within the designated snapshot area thus enabling proper assembly of the snapshot.